Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Conversation

@xueyuan
Copy link

@xueyuan xueyuan commented Nov 14, 2013

Here's code to add client side timeout for the java stubs. This timeout is defaulted to be 10 minutes and is meant to isolate the caller and xenserver in case there are problems in xenserver's side in processing the request. This allows the client to timeout on the client side and return an error back to the caller instead of tying up the thread waiting for a response that may never come. It is not meant as a retry mechanism.

The second commit adds a method to check if an object is actually null. When a XenAPIObject is null, the marshalling code does not set the object as null. It actually returns an object that contains the words "Opaque:NULL" in them. This method allows the caller to check this condition without writing the hard coded string themselves.

Alex Huang added 2 commits November 14, 2013 06:04
…timeout on sync calls. This is good for client side fault isolation during server-to-server communications
@kc284
Copy link

kc284 commented Jan 13, 2014

Hi Alex,
I'm happy to merge these changes, I have one comment only, I think it would be better if the connection timeout were configurable like the reply timeout, i.e. I suggest adding one more field defaulting to 5 sec and an extra parameter to your constructor overload (or an extra overload). Let me know what you think.

@xueyuan
Copy link
Author

xueyuan commented Jan 14, 2014

Hi Tina,

I agree with that. We can certainly add a parameter to allow callers to specify the timeout. Thank you.

--Alex

@kc284
Copy link

kc284 commented Jan 15, 2014

Ok, I'll merge this pull request and then I'll make the additional modification.

Many thanks,
Tina

kc284 pushed a commit that referenced this pull request Jan 20, 2014
Client side connection timeout and a check for if an object is null.
@kc284 kc284 merged commit 4319e15 into xapi-project:master Jan 20, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants